# leetcode 349 两个数组的交集

class Solution:
    def intersection(self, nums1: List[int], nums2: List[int]) -> List[int]:
        nmap = {}
        for i in nums1:
            nmap[i] = i
        ret = set()
        for j in nums2:
            if j in nmap:
                ret.add(j)
        return list(ret)
